package com.health.system.vo;

import com.health.system.common.validated.groups.UpdateGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author 黄叶
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@ApiModel("角色新增和角色分配实体类")
public class AdminRoleVo {

    @NotNull(message = "角色id不能为空", groups = UpdateGroup.class)
    @ApiModelProperty("角色id")
    private Long id;

    @NotBlank(message = "角色名称不能为空")
    @ApiModelProperty("角色名称")
    private String name;

    @NotBlank(message = "角色标签不能为空")
    @ApiModelProperty("角色标签")
    private String label;

    @NotEmpty(message = "分配id不能为空", groups = UpdateGroup.class)
    @ApiModelProperty("资源id或菜单id")
    private List<Long> ids;
}
